</div><!-- wrapper end -->
	
<footer id="colophon" role="contentinfo">
	<nav id="footer-nav">
		<?php 
			class FooterNav_Walker_Nav_Menu extends Walker_Nav_Menu {
				function start_el(&$output, $item, $depth=0, $args=array(), $id=0) {
					if($output) $output.= '<span> · </span>';
					$attributes = !empty($item->target) ? ' target="' . esc_attr($item->target) . '"' : '';
					$attributes .= !empty($item->xfn) ? ' rel="' . esc_attr($item->xfn) . '"' : '';
					$output .= '<a href="' . $item->url . '"' . $attributes . '>' . $item->title . '</a>';
				}
			}
			wp_nav_menu( array(
				'depth' => 1,
				'container' => false,
				'items_wrap' => '%3$s',
				'walker' => new FooterNav_Walker_Nav_Menu(),
				'theme_location' => 'footer_nav',
				'fallback_cb' => 'bzg_page_nav',
			));
		?>
	</nav>
	<div id="site-footer">
		<p>
			<span class="copy">Copyright &copy; <?php echo date_i18n('Y'); ?></span>
			<span class="siteinfo">
				<a href="<?php echo home_url('/'); ?>">
					<?php bloginfo('name'); ?>
				</a>
				<?php
					if($blogdescription = get_option('blogdescription')) {
						echo ': ' . $blogdescription;
					}
				?>
			</span>
		</p>
		<p>
			<?php
				if($icp_num = get_option('icp_num')) {
					echo '<span class="icp">ICP备案: <a href="https://beian.miit.gov.cn/" rel="noopener nofollow" target="_blank">' . $icp_num . '</a></span>';
				}
				if($gongan_num = get_option('gongan_num')) {
					preg_match('/\d+/', $gongan_num, $machs);
					if($machs) {
						echo '<span class="gongan">
							<img src="' . get_theme_file_uri('/assets/images/beian.png') . '">
							<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=' . $machs[0] . '" rel="noopener nofollow" target="_blank">
							' . $gongan_num . '
							</a></span>';
					}
				}
			?>
			<?php echo htmlspecialchars_decode(get_option('analytics_code'), ENT_QUOTES); ?>
		</p>
	</div>

	<!-- <?php echo get_num_queries(); ?> queries in <?php timer_stop(3); ?> seconds -->
	
	<?php wp_footer(); ?>

</footer>
</body>
</html>
